<?php
function Count_regiservip(){
$Count_regiservip_sql = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_user") );
return $Count_regiservip_sql[0];
}

function Count_regisertip(){
$Count_regisertip_sql = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_user WHERE  `tip` LIKE  '1'") );
return $Count_regisertip_sql[0];
}

function Count_olqqnum(){
$Count_olqqnum_sql1 = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_server1") );
$Count_olqqnum_sql2 = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_server2") );
$Count_olqqnum_sql3 = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_server3") );
$Count_olqqnum=$Count_olqqnum_sql1[0] + $Count_olqqnum_sql2[0] + $Count_olqqnum_sql3[0];
return $Count_olqqnum;
}

function Count_userqiandao(){
$Count_userqiandao_sql = mysql_fetch_array( mysql_query("SELECT SUM(common) FROM xige_qiandao") );
return $Count_userqiandao_sql[0];
}

function Count_userspread(){
$Count_userspread_sql = mysql_fetch_array( mysql_query("SELECT SUM(spread) FROM xige_info") );
return $Count_userspread_sql[0];
}

function Count_userhooktime(){
$Count_userhooktime_sql = mysql_fetch_array( mysql_query("SELECT SUM(length) FROM xige_info") );
$Count_userhooktime=round($Count_userhooktime_sql[0]/60,0);
return $Count_userhooktime;
}

function Count_lixinanum($qqnumber){
$Count_lixinanum_sql = mysql_fetch_array( mysql_query("SELECT COUNT(id) FROM xige_qqlist WHERE  `qqol` LIKE  '1'") );
$Count_lixinanum=round(100-(($Count_lixinanum_sql[0] / $qqnumber)*100),2);
return $Count_lixinanum;
}

?>